package com.scu.gkvr_system_backend.controller;

import com.scu.gkvr_system_backend.service.DegreesService;
import com.scu.gkvr_system_backend.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @project gkvr_system_backend
 * @description 学位相关Controller层代码
 * @date 2024/5/9 15:24:29
 * @version V1.0
 */
@RestController
@RequestMapping("/degrees")
@CrossOrigin
public class DegreesController {
    @Autowired
    private DegreesService degreesService;

    /**
     *  获取全部学位信息
     */
    @GetMapping("/list")
    public Result getListDegrees() {
        return Result.success(degreesService.list());
    }
}
